package com.cq.digitalemployee.user.service;

import com.cq.digitalemployee.user.entity.po.SysPermission;

import java.util.List;
import java.util.Set;

public interface PermissionService {

    Set<SysPermission> findAllPermissionByUser(String userId);

    List<SysPermission> findAll();

    SysPermission findById(String id);

    Set<SysPermission> findByUser(String userId);

    Set<SysPermission> findByRole(String roleId);

    int add(SysPermission sysPermission);

    int edit(SysPermission sysPermission);

    int delete(String id);

    int grantByUser(String permissionId, String userId);

    int grantByRole(String permissionId, String roleId);

}
